home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)td.d64
/
home file.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
5KB
|
222 lines
5 POKE53280,11:POKE53281,0:PRINT"[154]"
10 PRINT"[147]";CHR$(142):GOSUB2000
15 DIMIC(601),N$(601),P$(100):OPEN15,8,15,"I0":OPEN3,0
20 OPEN5,8,5,"0:INDEX"
21 INPUT#15,A,M$,C,D:IFA=62THENCLOSE5:GOTO45
23 IFA>0THENGOSUB620
25 FORF=1TO601:INPUT#5,IC(F),N$(F):NEXT
30 INPUT#5,CT:CLOSE5
40 GOTO48
45 FORF=1TO601:IC(F)=0:N$(F)="*":NEXT:CT=0
48 PRINT"[147]";CHR$(14)
50 XT$="[205]ASTER [205]ENU"
52 GOSUB400
54 PRINT" 1) [193]DD [206]EW [198]ILE"
56 PRINT" 2) [196]ISPLAY [198]ILE"
57 PRINT" 3) [204]IST [198]ILES"
58 PRINT" 4) [212]OTAL [194]LANK [198]ILES"
60 PRINT" 5) [212]OTAL [214]ALUE"
64 PRINT" 0) [197]ND"
65 PRINT" [205]ENU #:1[157]";:INPUT#3,O$:PRINT
66 IFO$="0"THENGOSUB450:CLOSE3:CLOSE15:PRINT"[147]":END
67 X1$="MENU"
68 IFO$="1"THEN100
70 IFO$="3"THEN340
72 IFO$="4"THEN500
73 IFO$="5"THEN718
74 IFO$<>"2"THEN50
76 GOTO210
100 XT$="[193]DD [206]EW [198]ILE"
105 GOSUB400
106 FORF=1TO601:IFN$(F)="*"THEN110
107 NEXT
108 PRINT"[212]HIS [198]ILE IS [198][213][204][204]":GOTO50
110 PRINT"[151][201]TEM :[193]BC[154]":GOSUB850
120 PRINT"[151][205]ODEL:[193]BC[154]":GOSUB850
130 PRINT"[151][211]ER #:123[154]":GOSUB850
132 PRINT"[151][196]ATE :[205][205]/[196][196]/[217][217][154]":GOSUB850
134 PRINT"[151][195]OST :$000[154]":GOSUB850
135 PRINT"[151][195]OMMENT:[193]BC[154]"
140 GOSUB930
160 X$="[211]AVE "
165 GOSUB900
170 IFF1THENGOSUB1100:GOTO185
175 IFF3THEN50
180 GOTO165
185 IC(F)=F:N$(F)=B$(1):CT=CT+VAL(B$(5))
190 GOTO50
210 XT$="[196]ISPLAY [198]ILE"
215 GOSUB400
220 PRINT"";TAB(5);"[198]ILE [206]AME:[193]BC[157][157][157]";:INPUT#3,SN$:PRINT
225 Q=0:GOSUB800
230 FORF=1TO601
235 IFN$(F)="*"THEN245
240 IFLEFT$(SN$,3)=LEFT$(N$(F),3)THENPRINTTAB(5);N$(F);TAB(33);F:Q=1
245 NEXT:IFQ>0THEN250
246 PRINTTAB(5);"[198]ILE [206][207][212] [198]OUND":X$="[195]ONTINUE"
247 GOSUB900:IFF1THEN210
248 IFF3THEN50
249 GOTO247
250 PRINTTAB(5)"[197]NTER [198]ILE #1 [157][157][157][157]";:INPUT#3,F:PRINT
252 IFF>601THENPRINT"[145][145][145]":GOTO250
253 IFIC(F)<1THENPRINT"[145][145][145]":GOTO250
259 GOSUB1000:XT$="[196]ISPLAY [198]ILE":GOSUB400:PRINT""
260 PRINT"[151][201]TEM :[154]";B$(1):PRINT
265 PRINT"[151][205]ODEL:[154]";B$(2):PRINT
270 PRINT"[151][211]ER #:[154]";B$(3):PRINT
275 PRINT"[151][196]ATE :[154]";B$(4):PRINT
280 PRINT"[151][195]OST :$[154]";B$(5):PRINT
285 PRINT"[151][195]OMMENT:[154]";B$(6)
295 X$="[196]ELETE":X1$="UPDATE":X2$="MENU"
300 GOSUB890
305 IFF1THEN325
310 IFF3THEN1300
312 IFF5THEN50
315 GOTO300
325 PRINT"[145] [214]ERIFY [198]ILE FOR [196]ELETE:([217]/[206]) "
328 GETA$:IFA$=""THEN328
330 IFA$="[217]"ORA$="Y"THENCT=CT-VAL(B$(5)):IC(F)=0:N$(F)="*"
335 GOTO50
340 XT$="[198]ILE [204]ISTING":LM=1
345 GOSUB400:GOSUB800:X$="CONTINUE":Q=0
350 FORF=1TO601
355 IFN$(F)<>"*"THENPRINTTAB(5)N$(F)TAB(33)F:LM=LM+1:Q=1
360 IFLM>13THEN375
370 NEXT
371 PRINTTAB(5)"[197]ND OF [204]ISTING[146]":GOTO550
375 GOSUB900:IFF1THENLM=1:GOSUB400:GOSUB800:GOTO370
380 IFF3THEN50
385 GOTO375
400 PRINT"[147]";TAB(10);"[183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
405 PRINTTAB(16)XT$
410 PRINTTAB(10)"[175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]":RETURN
450 OPEN5,8,5,"@0:INDEX,S,W"
460 FORF=1TO601:PRINT#5,IC(F);CHR$(13);N$(F);CHR$(13);
470 NEXT
480 PRINT#5,CT;CHR$(13);:GOSUB600
490 CLOSE5
495 RETURN
500 CN=0
510 PRINTTAB(10)"[145][194]LANK [198]ILES[146]":PRINT
520 FORF=1TO601:IFIC(F)>0THENCN=CN+1
525 NEXT
530 CN=601-CN
540 PRINTTAB(13)CN
550 X$="[157][157][157][157][157] "
560 GOSUB900
570 IFF3THEN50
580 GOTO560
600 INPUT#15,A,M$,C,D
610 IFA=0THENRETURN
620 PRINT"[197]RROR :";A;M$;C;D
630 PRINT"[195]ONTINUE:[217][157]";:INPUT#3,Y$:IFY$="Y"ORY$="[217]"THENRETURN
640 CLOSE5:CLOSE2:CLOSE3:CLOSE15:STOP
718 R$=STR$(INT(CT)):R$="$"+R$+".00"
720 PRINTTAB(10)"[145][212]OTAL [214]ALUE[146]":PRINT:PRINTTAB(10)R$
730 GOTO550
735 B$(Z)="":X=0:PRINTTAB(TB)"[164][157]";
740 GETA$:IFA$=""THEN740
745 IFA$=CHR$(13)THENPRINT" ":FORT=0TOX:B$(Z)=B$(Z)+P$(T):NEXT:PRINT:RETURN
750 IFA$=CHR$(17)ORA$=CHR$(29)ORA$=CHR$(145)ORA$=CHR$(157)ORA$=CHR$(34)THEN740
751 IFA$=CHR$(148)THEN740
752 IFA$=CHR$(20)ANDX=0THEN740
755 IFA$=CHR$(20)THENX=X-1:GOTO775
760 X=X+1
765 IFX>LLTHENPRINTCHR$(20);:X=X-1
770 P$(X)=A$
775 PRINTA$"[164][157]";
780 GOTO740
800 PRINT"";TAB(5)"[198]ILE [206]AME"TAB(31)"[198]ILE #"
810 PRINTTAB(5)"[183][183][183][183][183][183][183][183][183]"TAB(31)"[183][183][183][183][183][183]"
820 RETURN
850 PRINTTAB(5)"[151][188]--------------------------------[190][154]"
860 RETURN
890 PRINT"":FORT=1TO22:PRINT:NEXT
895 PRINT" [151][198]1-";X$;TAB(17);"[198]3-";X1$;TAB(32);"[198]5-";X2$;"[154][145]":GOTO905
900 PRINT"":FORT=1TO22:PRINT:NEXT
902 PRINTTAB(6)"[151][198]1-";X$;TAB(25);"[198]3-";X1$;"[154][145]"
905 F1=0:F3=0:F5=0
910 GETA$:IFA$=""THEN910
912 IFA$=CHR$(133)THENF1=1:RETURN
914 IFA$=CHR$(134)THENF3=1:RETURN
916 IFA$=CHR$(135)THENF5=1:RETURN
920 GOTO910
930 PRINT"":FORT=1TO5:PRINT:NEXT
935 Z=1:TB=6:LL=25:GOSUB735
940 Z=2:GOSUB735
945 Z=3:GOSUB735
950 Z=4:GOSUB735
955 Z=5:TB=7:LL=9:GOSUB735
960 Z=6:TB=8:LL=71:GOSUB735
965 PRINT"[145]":RETURN
1000 OPEN2,8,2,"#"
1010 GOSUB1200
1020 PRINT#15,"U1:";2;0;T;S
1030 PRINT#15,"B-P:";2;1
1040 GOSUB600
1050 FORM=1TO6:INPUT#2,B$(M):NEXT
1090 CLOSE2:RETURN
1100 OPEN2,8,2,"#"
1110 GOSUB1200
1120 PRINT#15,"B-P:";2;1
1130 FORM=1TO6:PRINT#2,B$(M);CHR$(13);:NEXT
1140 PRINT#15,"U2:";2;0;T;S
1150 GOSUB600
1160 CLOSE2
1170 RETURN
1200 IFF<295THENF1=0:F2=22:F3=1:GOTO1240
1210 IFF>294ANDF<409THENF1=294:F2=20:F3=19:GOTO1240
1220 IFF>408ANDF<517THENF1=408:F2=19:F3=25:GOTO1240
1230 IFF>516THENF1=516:F2=18:F3=31
1240 T=INT(((F-F1)-1)/(F2-1))+F3
1250 S=F-F1-(T-F3)*F2+(T-F3-1)
1260 RETURN
1300 X$="SELECT"
1305 SF=0
1310 GOSUB890:IFSF=7THENSF=0
1320 IFF1THENSF=SF+1:GOTO1350
1330 IFF3THEN1400
1335 IFF5THEN50
1340 GOTO1310
1350 ONSFGOTO1360,1365,1370,1375,1380,1385
1360 L=16:GOSUB1390:PRINT"[151][195]OMMENT:[154]":L=6:GOSUB1390:PRINT"[201]TEM :[145]":GOTO1310
1365 L=6:GOSUB1390:PRINT"[151][201]TEM :[154]":PRINT:PRINT"[205]ODEL:[145]":GOTO1310
1370 L=8:GOSUB1390:PRINT"[151][205]ODEL:[154]":PRINT:PRINT"[211]ER #:[145]":GOTO1310
1375 L=10:GOSUB1390:PRINT"[151][211]ER #:[154]":PRINT:PRINT"[196]ATE :[145]":GOTO1310
1380 L=12:GOSUB1390:PRINT"[151][196]ATE :[154]":PRINT:PRINT"[195]OST :[145]":GOTO1310
1385 L=14:GOSUB1390:PRINT"[151][195]OST :[154]":PRINT:PRINT"[195]OMMENT:[145]":GOTO1310
1390 PRINT"":FORT=1TOL:PRINT:NEXT:RETURN
1400 ONSFGOTO1410,1420,1430,1440,1450,1460
1410 Z=1:TB=6:LL=25:L=6
1415 GOSUB1390:GOSUB735:N$(F)=B$(Z):GOTO1475
1420 Z=2:TB=6:LL=25:L=8:GOTO1470
1430 Z=3:TB=6:LL=25:L=10:GOTO1470
1440 Z=4:TB=6:LL=25:L=12:GOTO1470
1450 Z=5:TB=7:LL=9:L=14:GOTO1470
1460 Z=6:TB=8:LL=71:L=16
1470 GOSUB1390:GOSUB735
1475 GOSUB890:IFF1THEN1300
1480 IFF3THENGOSUB1100:GOTO50
1485 IFF5THEN50
1490 GOTO1475
2000 PRINT"":PRINT"[152]"
2005 PRINTTAB(10);"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]":PRINT"[145]"
2006 FORTL=1TO18
2007 PRINTTAB(10);"[191][146] [191][146]"
2008 NEXT
2009 PRINTTAB(10);"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]":PRINT:PRINT"[154]"
2010 PRINTTAB(11)" [181] [182] [206][183][205] [206][205][206][205] [206][183][184] "
2020 PRINTTAB(11)" [204][175][186] [180] [170] [180][167][165][170] [204][185] "
2030 PRINTTAB(11)" [165] [167] [180] [170] [180][170][180][170] [180] "
2040 PRINTTAB(11)" [181] [182] [205][175][206] [181] [182] [205][175][185] "
2050 PRINT""
2060 PRINTTAB(12)" [206][183][184] [181] [181] [206][183][184] "
2070 PRINTTAB(12)" [204][185] [181] [181] [204][185] "
2080 PRINTTAB(12)" [180] [181] [181] [180] "
2090 PRINTTAB(12)" [181] [161] [205][175][185] [205][175][185] "
2100 PRINT""
2110 PRINTTAB(17)"[152] BY [154]"
2120 PRINT
2130 PRINTTAB(13)"ERWIN ROTHNER"
2140 RETURN